<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    <title> Demo </title>
    <link rel="stylesheet" type="text/css" href="jquery.printHtml.css" />
    <script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="jquery.printHtml.js"></script>
    <script type="text/javascript">
    function printDiv(preview) {
      $.printHtml($("#test").html(), preview);
    }
    </script>
  </head>
  <body>
    <div id="test">
    <h1>Hello</h1>
    [pagebreak]
    <p>world</p>
    </div>
    <input type="button" value="Preview" onclick="printDiv(true)" />
    <input type="button" value="Print" onclick="printDiv(false)" />
  </body>
</html>

